package ${nameSpace}.struts2.${actionSpace};
import java.util.Collection;

import javax.annotation.Resource;

import org.jackysoft.entity.${entityName};
import org.jackysoft.service.${entityName}Service;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.jackysoft.struts2.UtilsCRUDAction;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;



@Namespace("/${entityName?lower_case}")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class ${entityName}Action extends UtilsCRUDAction<${entityName}> {
	private ${entityName}Service service;
	private ${entityName} bean;
	private Collection<${entityName}> beans;	
	
	
	
	
	
	
	public void setBean(${entityName} bean){
	     this.bean = bean;
	}
	public ${entityName} getBean(){
	     return this.bean;
	}
	public void setBeans(Collection<${entityName}> beans){
	
	     this.beans = beans;
	}
	public Collection<${entityName}> getBeans(){
	     return this.beans;
	}
	
	@Resource
	public void setService(${entityName}Service service) {
		this.service = service;
		this.setDataProvider(service);
	}	
	
	public ${entityName}Service getService(){
	   return this.service;
	}
		
}